package com.zzx.test.future;

import org.junit.Test;

import java.util.ArrayList;

public class FourteenClass1 {

    @Test
    public void instanceOfJdk14() {
        Object obj = new ArrayList<>();
        if (obj instanceof ArrayList list) {
            list.add("www.wdbyte.com");
        }
        System.out.println(obj);
    }

    @Test
    public void nullPointerExceptionJdk14() {
        String content1 = "www.wdbyte.com";
        String content2 = null;
        int length = content1.length() + content2.length();
        System.out.println(length);
    }

    // 增强表达式的正式使用



}
